<% content_for :heading do %>
  <h1><%= @title %></h1>
  <ul class='secondary-actions clearfix'>
    <li><%= t(".description") %></li>
    <li><%= rss_link_to :action => "georss", :display_name => @display_name, :tag => @tag %></li>
    <li><%= link_to t(".upload_trace"), new_trace_path %></li>
    <% if @tag %>
      <li><%= link_to t(".see_all_traces"), :controller => "traces", :action => "index", :display_name => nil, :tag => nil, :page => nil %></li>
      <li><%= link_to t(".see_my_traces"), :action => "mine", :tag => nil, :page => nil %></li>
    <% else %>
      <% if @display_name %>
        <li><%= link_to t(".see_all_traces"), :controller => "traces", :action => "index", :display_name => nil, :tag => nil, :page => nil %></li>
      <% end %>
      <% if current_user && current_user != @target_user %>
        <li><%= link_to t(".see_my_traces"), :action => "mine", :tag => nil, :page => nil %></li>
      <% end %>
    <% end %>
  </ul>
<% end %>

<% content_for :auto_discovery_link_tag do %>
<%= auto_discovery_link_tag :rss, :action => "georss", :display_name => @display_name, :tag => @tag %>
<% end %>

<% if @traces.size > 0 %>
  <%= render "trace_paging_nav", :page => @page, :page_size => @page_size, :traces => @traces, :params => @params %>

  <table id="trace_list" class="table table-borderless table-striped">
    <tbody>
      <%= render @traces unless @traces.nil? %>
    </tbody>
  </table>

  <%= render "trace_paging_nav", :page => @page, :page_size => @page_size, :traces => @traces, :params => @params %>
<% else %>
  <h4><%= t ".empty_html", :upload_link => new_trace_path %></h4>
<% end %>
